package com.zhangc.blog.base;

import org.apache.commons.lang3.StringUtils;

import com.zhangc.blog.base.validator.ServiceException;
import com.zhangc.blog.base.validator.ServiceExceptionNameProvider;

/**
 * 功能描述:<br>
 *
 * @author wx:fdzhangc
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
public class SoofServiceException extends ServiceException {
    private static final long serialVersionUID = -7458107409212294975L;

    /**
     * Instantiates a new Soof service exception.
     *
     * @param provider the provider
     */
    SoofServiceException(ServiceExceptionNameProvider provider) {
        super(provider.getName());
    }

    /**
     * Instantiates a new Soof service exception.
     *
     * @param provider the provider
     * @param args     the args
     */
    SoofServiceException(ServiceExceptionNameProvider provider, Object... args) {
        super(provider.getName(), args);
    }

    /**
     * Instantiates a new Soof service exception.
     *
     * @param code    the code
     * @param message the message
     */
    SoofServiceException(String code, String message) {
        super(code, message);
    }

    /**
     * Instantiates a new Soof service exception.
     *
     * @param message the message
     */
    public SoofServiceException(String message) {
        this(StringUtils.EMPTY, message);
    }
}
